﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Controls;

namespace JumpstartApp.Controls
{
    using JumpstartApp.Models;

    public class TemplateSelector : DataTemplateSelector
    {
        protected override Windows.UI.Xaml.DataTemplate SelectTemplateCore(object item, Windows.UI.Xaml.DependencyObject container)
        {
            if (item is AdvertRecord)
                return AdTemplate;
            return NormalTemplate;
        }

        public Windows.UI.Xaml.DataTemplate AdTemplate { get; set; }
        public Windows.UI.Xaml.DataTemplate NormalTemplate { get; set; }
    }
}
